﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="RegisterReturn.aspx.cs" Inherits="AdminPages_RegisterReturnDispatch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

        Return
        <asp:GridView ID="GridView_Return" runat="server" 
    DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="MovieID" 
            onrowcommand="GridView_Return_RowCommand">
            <Columns>
                <asp:BoundField DataField="MovieID" HeaderText="MovieID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="MovieID" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="StartDate" HeaderText="StartDate" 
                    SortExpression="StartDate" />
                <asp:BoundField DataField="EndDate" HeaderText="EndDate" 
                    SortExpression="EndDate" />
                <asp:BoundField DataField="UserName" HeaderText="UserName" 
                    SortExpression="UserName" />
                <asp:BoundField DataField="StockID" HeaderText="StockID" 
                    SortExpression="StockID" />
                <asp:ButtonField ButtonType="Button" CommandName="return" Text="Return" />
            </Columns>
            <EmptyDataTemplate>
                No data available
            </EmptyDataTemplate>
        </asp:GridView>
        
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>" 
            
            SelectCommand="SELECT Movie.MovieID, Movie.Title, ActualRent.StartDate, ActualRent.EndDate, Customer.UserName, ActualRent.StockID FROM ActualRent INNER JOIN Movie ON ActualRent.MovieID = Movie.MovieID INNER JOIN Customer ON ActualRent.CustomerID = Customer.CustomerID">
        </asp:SqlDataSource>



</asp:Content>

